1. Field of the Invention
This invention pertains generally to methods of communication and, more particularly, to such methods employing a plurality of communication layers and communication buffers. The invention also relates to a communicating node including a plurality of communication layers and communication buffers.
2. Background Information
In order to better achieve flexibility to carry many different types of information over a single system, communication systems are designed with a layered architecture. One example of a general layered architecture for networking protocols and distributed applications is the International Standard Organization's Open System Interconnect (ISO/OSI) model.
The ISO/OSI model comprises a communication system having seven layers which form a communication path between a first end user and a second end user. The seven layers may be divided into two sets: (1) a set of upper layers; and (2) a set of lower layers. The upper four layers (e.g. transport, session, presentation and application layers) normally reside in application end users. A communication system may, in some cases, be defined by the lower three layers, individually known as the network layer, the data link layer and the physical layer.
Each layer is responsible for specific, defined operations in the communication process between application end users. In furtherance of these operations, each layer may communicate information with the layers above and below it through defined interfaces (although there is not always a definitive separation between layers). Thus, for example, the transport layer may operate independently of the specific operational details of the network layer, the data link layer and the physical layer below it. The set of lower layers thus operates as a transparent data pipeline to an application end user connected to the system at the transport layer interface.
A flow of data occurs between layers such as may occur during communication between two application end users. Information may be passed between like layers of each end user through a path ultimately connected at the physical layer. The rules that govern how data is passed between like layers at each end user are collectively referred to as a “peer-to-peer protocol.” A variety of different application end users operating with different peer-to-peer protocols may communicate over a communication system so long as each application end user presents the proper upper layer interface to the communication system. Conversely, an application end user may connect with any communication system having a compatible lower layer interface.
Generally, it is common that only a subset of the seven layers are employed within a network or that one or more layers are merged. Each layer employs the services of the layer below it and provides services to the layers above it. Thus, for example, the network layer, which is responsible for establishing and maintaining the flow of messages between connected points in the network, is dependent upon the data link layer to provide, for example, character and message synchronization and error correction. The data link layer is, in turn, dependent upon the physical layer to actually transmit and receive information as electrical or wireless signals on the network.
Communication stacks are often implemented in a layered structure, with each layer providing a certain function. This allows some flexibility in the implementation, enables compliance with existing standards and permits a certain degree of customization. This also enables an application to become independent from the communication mechanism and allows relatively faster implementation thereof.
A wireless node in a low-rate network supports a set of communication layers, in order to enable it to communicate with other peer wireless nodes in the network. The protocol stack has several layers (e.g., physical; medium access control (MAC) sub-layer of the data link layer; network; application support layer (e.g. transport layer; session layer; presentation layer); application layer), in order to provide different corresponding services. A key challenge in implementing a low-rate wireless communication stack in a relatively low-cost, embedded environment is the limited resources that are available, especially when using off-the-shelf components, since each layer needs sufficient memory to adequately process incoming and outgoing messages.
Quantum Programming (QP) is a programming paradigm that extends traditional object-oriented programming (OOP) with two additional fundamental concepts: (1) hierarchical state machines, and (2) active object-based computing. See http://www.quantum-leaps.com/glossary.htm. These two concepts complement encapsulation, inheritance, and polymorphism.
The quantum analogy of QP consists of two elements. First, reactive software systems are analogous to quantum systems in that they are always found in strictly defined discrete states (i.e., quantum states) and can change their state only by means of uninterruptible run-to-completion (RTC) steps (i.e., quantum leaps). The states are naturally hierarchical and must comply with the Liskov Substitution Principle (LSP) for states. State nesting is fundamental and it expresses various symmetries within the system. Second, the hierarchical state machines interact with one another according to the active object-based computing model, which is analogous to the way particles interact in the quantum field theory. The only interaction allowed among reactive objects (i.e., hierarchical state machines) is the explicit exchange of event instances (i.e., intermediate virtual particles). The quantum model of interaction corresponds to the publish-subscribe model in software.
Quantum Framework (QF) is a minimal realization of an active object-based application framework specialized for embedded real-time systems. QF is a publish-subscribe architecture based on the quantum analogy of Quantum Programming. See Samek, M., Practical Statecharts in C/C++: Quantum Programming for Embedded Systems, CMP Books, 2002, pp. 187-91.
QF seeks to avoid all potentially risky (e.g., semaphores; monitors; condition variables; signals; other mechanisms employed in multitasking environments) programming techniques internally, but does not limit the application designer to only these techniques. QF has a relatively small memory footprint (e.g., about 5 Kbytes) and executes applications deterministically. QF is marketed royalty-free by Miro Samek of Palo Alto, Calif. at www.quantum-leaps.com, and can be embedded in commercial products. See Samek, M., Practical Statecharts in C/C++: Quantum Programming for Embedded Systems.
QF supports, for example, publish-subscribe event delivery, automatic garbage collection for events and timeout events. The framework is relatively very compact, typically taking up less than about 4 Kbytes of code and data. QF is employed, for example, in embedded real-time systems.
A main job of QF is to manage the time and computer resources of a microprocessor to ensure that all time critical events are handled as efficiently as possible. In contrast to a traditional real-time operating system (RTOS), QF is an application framework, which means that QF provides an overall reusable architecture for applications derived from it. In a RTOS, there is a main body of the application that calls various RTOS services. In contrast, with QF, a main application skeleton provided by the framework is employed and the code it calls is added.
QF applications consist of independent elements called active objects that collaborate to collectively deliver the intended functionality. Active objects in QF are encapsulated tasks (each embedding an event queue and a state chart) that communicate with one another asynchronously by sending and receiving events. Within an active object, events are processed sequentially in a run-to-completion (RTC) fashion, while the framework encapsulates all the details of thread-safe event exchange and queuing. RTC does not mean that any given active object has to monopolize the processor until the RTC step is complete. In a multitasking environment, higher-priority active objects (or more generally higher-priority tasks or interrupts) can be running, possibly preempting the currently executing active object. As long as active objects do not share resources, there are no concurrency hazards (e.g., race conditions; deadlocks; priority inversions). As a result, applications are coded with purely sequential techniques, without employing semaphores, monitors, condition variables, signals or other such mechanisms that are indispensable in conventional RTOS-based applications. State machines are employed to decompose the behavior of an active object into separate chunks (states) that are coded and tested independently.
QF is a minimal implementation of an active object-based framework that is not biased toward mechanical code generation and does not include facilities for animation or instrumentation of state machines, although such facilities may be added. Furthermore, QF does not support such advanced, but expensive, features as recursive de-composition of active objects, multiple active object interfaces (ports), or protocol state machines that restrict certain event types and sequences from leaving and entering an active object. Instead, QF implements only the most basic active object-based computing model limited to asynchronous event exchange and a single level of decomposition of active objects.
QF internally employs some form of multitasking, in order to interleave the execution of concurrent active objects. Moreover, the underlying tasking model is preemptive if higher-priority active objects are to preempt lower-priority ones for timely processing of urgent events. QF may employ a relatively small preemptive kernel, thereby obviating the need for an external RTOS component. As a result, the RTC processing and the absence of a need for blocking of active objects allows QF to work with a very special class of preemptive kernels that utilize only a single stack for all tasks and interrupts.
It is known to provide as an “application framework” a set of cooperating classes that makes up a reusable design for a specific class of software. A framework provides architectural guidance by partitioning design into abstract classes and defining their responsibilities and collaborations. A developer customizes the framework to a particular application by subclassing and composing instances of framework classes. See Gamma, Erich, et al., Design Patterns, Elements of Reusable Object-Oriented Software, Addison-Wesley, 1995, ISBN 0-201-63361-2.
There is room for improvement in methods employing a plurality of communication layers and communication buffers. There is also room for improvement in communicating nodes including a plurality of communication layers and communication buffers.